package com.briup.day07;

public class Test01 {
    public static void main(String[] args) {
        Student s1 = new Student();
        System.out.println(s1);
        s1.name="larry";
        s1.age=26;
        System.out.println(s1.name);
        System.out.println(s1.age);
        s1.sayHello();
    }
}

class Student{//不能设置为public,public需要同名
    String name;
    int age;
    public void sayHello(){
        System.out.println("Hello");
    }
}
